package org.example.bulletin.controller;

import org.example.bulletin.entity.vo.Bulletin_Content_vo;
import org.example.bulletin.service.Bulletin_ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RestController
@RequestMapping("/bulletin")
public class Bulletin_ContentController {
    private final Bulletin_ContentService bulletin_contentService;

    public Bulletin_ContentController(Bulletin_ContentService bulletinContentService) {
        bulletin_contentService = bulletinContentService;
    }

    @GetMapping("/getContent")
    public Bulletin_Content_vo getContent(Integer id)
    {
        System.out.println(id);
        System.out.println("sa");
        return bulletin_contentService.getContent(id).get(0);
    }
}
